<!DOCTYPE html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <title>login</title>
   <link rel="stylesheet" href="style.css">
 </head>
 <body>
 <main>
<form class="form"><div class="form__cover">
</div>
<div class="form__loader">
<div class="spinner active">
<svg class="spinner__circular" viewBox="25 25 50 50">
<circle class="spinner__path" cx="50" cy="50" r="20" fill="none" stroke-width="4" stroke-miterlimit="10"></circle></svg></div></div>
<div class="form__content"><h1>你好,欢迎登陆</h1>
<div class="styled-input">

<input type="text" class="styled-input__input" name="nickname" id="loginnum">

<div class="styled-input__placeholder"><span class="styled-input__placeholder-text">
用户名</span></div><div class="styled-input__circle"></div></div>
<div class="styled-input">
<input type="text" class="styled-input__input" id="loginpwd">
<div class="styled-input__placeholder">
<span class="styled-input__placeholder-text">密码
</span></div><div class="styled-input__circle"></div></div>

<button type="button" class="styled-button" onclick="tan()"><span class="styled-button__real-text-holder">
<span class="styled-button__real-text">登陆</span>
<span class="styled-button__moving-block face"><span class="styled-button__text-holder">
<span class="styled-button__text">登陆</span></span></span><span class="styled-button__moving-block back">
<span class="styled-button__text-holder"><span class="styled-button__text">登陆</span></span></span></span></button></div></form>
</main>
<script src="login.js"></script>
<script src="jquery-2.1.4.min.js"></script>
 </body>
 <script>
	function tan(){
		var num = document.getElementById("loginnum").value
		var pwd = document.getElementById("loginpwd").value
     $.ajax({
         url:"login",
         data:{num:num,pwd:pwd},
         dataType:"JSON",
         success:function (data) {
             if (data==200){
                 location.href="./index.html"
             }
         }
     })
		//alert(num)
		//alert(pwd)
	}



 </script>
</html>
